import sys; input = sys.stdin.readline while 1: k, n, e = map(int, input().split()) if k == 0: break p = [1<